package collection;
//数组转集合
import sun.util.resources.cldr.en.CalendarData_en_US_POSIX;

import java.util.Arrays;
import java.util.List;

public class ArrayToList {
    public static void main(String[] args) {
        String[] array={"a","b","c","d","e"};
        System.out.println("array="+Arrays.toString(array));
        List<String> list=Arrays.asList(array);
        System.out.println(list);
        array[1]="six";
        System.out.println(list);

        list.set(3,"九亿少女的梦");
        System.out.println(list);
        /*
        String[] array={"one","two","three","fore","five"};
        System.out.println("array="+ Arrays.toString(array));

        List<String> list=Arrays.asList(array);
        System.out.println("list"+list);

        array[1]="six";
        System.out.println("array="+ Arrays.toString(array));
        System.out.println("list"+list);

        list.set(2,"seven");
        System.out.println("array="+ Arrays.toString(array));
        System.out.println("list"+list);

        //list.add("!!!!");//不能修改长度

         */
    }
}
